package com.rc.saas.tenant.service.acct;

import com.github.pagehelper.PageInfo;
import com.rc.saas.tenant.base.BaseService;
import com.rc.saas.tenant.mapper.acct.AcctBillOrderMapper;
import com.rc.saas.tenant.model.acct.AcctBillOrder;
import com.rc.saas.tenant.model.acct.AcctBillOrderExample;
import com.rc.saas.tenant.vo.acct.TenantOperatorOrderDataECharVo;
import com.rc.saas.tenant.vo.acct.TenantOperatorOrderDataVo;
import com.rc.saas.tenant.search.acct.AcctBillOrderSearch;
import com.rc.saas.tenant.search.acct.OrderAcctBillOrderSearch;
import com.rc.saas.tenant.vo.acct.AcctBillOrderResultVo;
import com.rc.saas.tenant.vo.order.OrderPrintVo;
import com.rc.saas.tenant.vo.order.OrderResult;

import java.math.BigDecimal;
import java.text.ParseException;
import java.util.List;

/**
 * @author frog
 * @date 2021/1/13
 */
public interface AcctBillOrderService extends BaseService<Long, AcctBillOrder, AcctBillOrderExample, AcctBillOrderMapper> {
    PageInfo<AcctBillOrderResultVo> listPageAcctBillOrder(AcctBillOrderSearch acctBillOrderSearch);

    AcctBillOrderResultVo selectAcctBillOrder(Long billOrderId);

    PageInfo<OrderResult> listPageByCondition(OrderAcctBillOrderSearch orderSearch);

    BigDecimal sumUnconfirmedAmount(String tenantOperatorCode);

    TenantOperatorOrderDataVo sumTenantOperatorOrderData(Long stationId, String startTime, String endTime, String tenantOperatorCode);

    List<TenantOperatorOrderDataECharVo> sumTenantOperatorOrderECharData(Long stationId, String startTime, String endTime, String tenantOperatorCode);

    int countByNotReviewedOrder(String tenantCode);

    List<AcctBillOrderResultVo> listAcctBillOrderForComplete(String tenantOperatorCode);

    List<AcctBillOrderResultVo> exportAcctBillOrder(AcctBillOrderSearch acctBillOrderSearch);

    List<OrderPrintVo> exportOrderInfo(OrderAcctBillOrderSearch orderSearch);

    void updateFactAmount(Long billOrderId);

    void updateForStatus(AcctBillOrder acctBillOrder);

    int countByGeneratedOrder(String tenantCode);

    void saveAcctBillOrder(AcctBillOrder acctBillOrder);

    Long selectLastIdByDay(String tenantCode);

    AcctBillOrderResultVo selectSupplyAcctBillOrder(Long billOrderId);
}
